<!DOCTYPE html>
<html dir="ltr" xmlns="http://www.w3.org/1999/xhtml" lang="en"><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><meta content="en-us" name="WT.seg_1"><link rel="canonical" href="http://msdn.microsoft.com/en-us/library/ff926074.aspx">
        <title>C# Coding Conventions (C# Programming Guide)</title>




<meta name="DCS.dcsuri" content="/en-us/library/ff926074(d=default,l=en-us,v=vs.120).aspx">

<meta name="NormalizedUrl" content="http://msdn.microsoft.com/en-us/library/ff926074(d=default,l=en-us,v=vs.120).aspx">

<meta name="ms.normalizedurl" content="http://msdn.microsoft.com/en-us/library/ff926074(d=default,l=en-us,v=vs.120).aspx">

<meta name="DCSext.ProductFamily" content="LIB_DG">

<meta name="DCSext.Product" content="VS_Lang_CS">

<meta name="DCSext.Title" content="C# Coding Conventions (C# Programming Guide)">

<meta name="VotingContextUrl" content="http://msdn.microsoft.com/en-us/library/ff926074(d=default,l=en-us,v=vs.120).aspx">

<meta name="MN" content="EE4293BE-6:03:17 AM">

<meta name="Search.ShortId" content="ff926074">

<meta name="ms.shortidmsdn" content="ff926074">

<meta name="Ms.Locale" content="en-us">








        
    <link rel="stylesheet" type="text/css" href="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/Combined.css"><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/ms2.js" async="" type="text/javascript"></script><script async="" src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/ai.js" type="text/javascript"></script><script class="mtps-injected">try {
/**/
(window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = { 
	"image": "http://i.msdn.microsoft.com", 
	"js": "http://i2.msdn.microsoft.com", 
	"css": "http://i3.msdn.microsoft.com"
});
/**/
} finally { MTPS._injectNextScript_0 && MTPS._injectNextScript_0(); }</script><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/jquery-1.js" class="mtps-injected"></script><script class="mtps-injected">try {
//
  var literalNormalizedUrl = '/en-us/library/ff926074(d=default,l=en-us,v=vs.120).aspx';
  var wt_nvr_ru = 'WT_NVR_RU';
  var wt_fpcdom = '.microsoft.com';
  var wt_domlist = 'msdn.microsoft.com';
  var wt_pathlist = '';
  var wt_paramlist = 'DCSext.mtps_devcenter';
  var wt_siteid = 'MSDN';
  var gDomain = 'm.webtrends.com';
  var gDcsId = 'dcsmgru7m99k7mqmgrhudo0k8_8c6m';
  var gFpc = 'WT_FPC';



  if (document.cookie.indexOf(gFpc + "=") == -1) {
    var wtidJs = document.createElement("script");
    wtidJs.src = "//" + gDomain + "/" + gDcsId + "/wtid.js";
    document.getElementsByTagName("head")[0].appendChild(wtidJs);
  }



  var detectedLocale = 'en-us';
  var wtsp = 'msdnlib_devtools_lang';
  var gTrackEvents = '0';
/**/
} finally { MTPS._injectNextScript_2 && MTPS._injectNextScript_2(); }</script><script class="mtps-injected">try {
/**/
  var omni_guid = "67f91a6f-e93d-4c42-921c-46a418f57af8";
/**/
} finally { MTPS._injectNextScript_3 && MTPS._injectNextScript_3(); }</script><script class="mtps-injected">try {
//

            window.appInsightsId = '60854590-027a-4ae4-98be-2741a40f355f';
            //
} finally { MTPS._injectNextScript_4 && MTPS._injectNextScript_4(); }</script><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/Combined.js" class="mtps-injected"></script><link media="print" type="text/css" rel="stylesheet" href="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/PrintView.css"><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/SearchBox.js" class="mtps-injected"></script><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/Combined_003.js" class="mtps-injected"></script><script class="mtps-injected">try {
MTPS = window.MTPS || {}; MTPS.LocalizedStrings = window.MTPS.LocalizedStrings || {}; MTPS.LocalizedStrings.ExpandButtonTooltip = 'Expand'; MTPS.LocalizedStrings.CollapseButtonTooltip = 'Collapse'; MTPS.LocalizedStrings.EnhancedExpandTooltip = 'Click to expand. Double-click to expand all.'; MTPS.LocalizedStrings.EnhancedCollapseTooltip = 'Click to collapse. Double-click to collapse all.'; MTPS.LocalizedStrings.ExpandAllButtonTooltip = 'Expand All'; MTPS.LocalizedStrings.CollapseAllButtonTooltip = 'Collapse All';
} finally { MTPS._injectNextScript_8 && MTPS._injectNextScript_8(); }</script><script class="mtps-injected">try {
MTPS = window.MTPS || {}; MTPS.LocalizedStrings = window.MTPS.LocalizedStrings || {}; MTPS.LocalizedStrings.ExpandButtonTooltip = 'Expand'; MTPS.LocalizedStrings.CollapseButtonTooltip = 'Collapse'; MTPS.LocalizedStrings.EnhancedExpandTooltip = 'Click to expand. Double-click to expand all.'; MTPS.LocalizedStrings.EnhancedCollapseTooltip = 'Click to collapse. Double-click to collapse all.'; MTPS.LocalizedStrings.ExpandAllButtonTooltip = 'Expand All'; MTPS.LocalizedStrings.CollapseAllButtonTooltip = 'Collapse All';
} finally { MTPS._injectNextScript_9 && MTPS._injectNextScript_9(); }</script><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/Combined_002.js" class="mtps-injected"></script><script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/broker.js"></script><script class="mtps-injected">try {
$(document).ready(function() {
        try {
            var token = $("#globalRequestVerification input[name='__RequestVerificationToken']").clone();
            $("#siteFeedbackForm").append(token);
        } catch(err) {
            
        }
    });
} finally { MTPS._injectNextScript_11 && MTPS._injectNextScript_11(); }</script></head>
    <body class="library">
        <div id="page">
            
            
  
            
        
    <link type="text/css" rel="stylesheet">
    
    <input id="isHeaderBleeding" value="true" type="hidden">
    <div id="ux-header" dir="ltr" class="ltr msdn">
        

        <header>
            <div class="row">
                <div class="top mobile"></div>
                <div class="left">
                    <div class="siteLogo">  
                        
<a class="msdnLogoImg" href="http://msdn.microsoft.com/">
                             <img src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/microsoftLogoForHeader.png">
                         </a>
                                                             
                        <div data-fragmentname="SiteLogo" id="Fragment_SiteLogo" xmlns="http://www.w3.org/1999/xhtml">
  <div class="LinkWithImage topImage">
    <a id="SiteLogo_2152_1" href="http://msdn.microsoft.com/">
                
                Developer Network
            </a>
  </div>
</div>    
                    </div>
                    <div id="grip"></div>
                </div>
                
                <div class="right desktop">
                    <div class="auxNav">
                        <div data-fragmentname="Subscriptions" id="Fragment_Subscriptions" xmlns="http://www.w3.org/1999/xhtml">
  <a href="https://msdn.microsoft.com/subscriptions/manage/hh442900" id="Subscriptions_2153_1" xmlns="http://www.w3.org/1999/xhtml">MSDN subscriptions</a>
</div>   
                        <div data-fragmentname="GetTools" id="Fragment_GetTools" xmlns="http://www.w3.org/1999/xhtml">
  <a href="http://go.microsoft.com/fwlink/?LinkId=309297&amp;clcid=0x409&amp;slcid=0x409" id="GetTools_2153_3" xmlns="http://www.w3.org/1999/xhtml">Get tools</a>
</div>   
                        <div id="signIn">

<a class="scarabLink" href="https://login.live.com/login.srf?wa=wsignin1.0&amp;rpsnv=12&amp;ct=1399381397&amp;rver=6.0.5276.0&amp;wp=MCLBI&amp;wlcxt=MSDN%24MSDN%24MSDN&amp;wreply=http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fff926074.aspx&amp;lc=1033&amp;id=254354&amp;mkt=en-US" title="Sign in">Sign in</a></div>

    

                    </div>
                    <div data-fragmentname="SearchBox" id="Fragment_SearchBox" xmlns="http://www.w3.org/1999/xhtml">
  <div class="SearchBox">
    <form id="HeaderSearchForm" name="HeaderSearchForm" method="get" onsubmit="return Epx.Controls.SearchBox.searchBoxOnSubmit(this);">
      <input autocomplete="off" id="HeaderSearchTextBox" name="query" maxlength="200" onfocus="Epx.Controls.SearchBox.watermarkFocus(event, this.title)" onblur="Epx.Controls.SearchBox.watermarkBlur(event, this.title)" type="text">
      <button title="Search MSDN" id="HeaderSearchButton" value="" type="submit" class="header-search-button"></button>
    <div style="display: none; text-align: left; border: 1px solid buttonshadow; position: absolute; z-index: 1000; padding: 2px; background-color: rgb(255, 255, 255); color: rgb(59, 59, 59); font-family: MS Shell Dlg; font-size: 13.3333px;" id="SearchFlyoutContainer"><div id="SuggestionContainer"><ul style="list-style: none outside none; padding: 4px 2px 0px 1px; cursor: pointer; margin: 1px; white-space: nowrap;"></ul></div></div></form>
    
    
  </div>
</div> 
                </div>
            </div>
       
            <div style="display: block;" class="row" id="droor">
                <div style="max-width: 1702px;" class="left">
                            <nav>
            <ul>
                     <li class="inactive">

                         <a href="http://msdn.microsoft.com/dn308572" title="Home">Home</a>

                     </li>
                     <li class="inactive">

                         <a href="http://msdn.microsoft.com/dn614592" title="Technologies">Technologies</a>
                                 <div class="area">
                                     <div class="arrow"></div>
                                 </div>
                                 <div style="" class="subNav">
                                     <ul>
                                                 <li><a href="http://msdn.microsoft.com/dn629512" title="Cloud">Cloud</a></li>
                                                 <li><a href="http://msdn.microsoft.com/dn629516" title="Mobile">Mobile</a></li>
                                                 <li><a href="http://msdn.microsoft.com/dn629514" title="Web">Web</a></li>
                                                 <li><a href="http://msdn.microsoft.com/dn629388" title="Business">Business</a></li>
                                                 <li><a href="http://msdn.microsoft.com/dn629513" title="Data">Data</a></li>
                                                 <li><a href="http://msdn.microsoft.com/dn629515" title="Gaming">Gaming</a></li>
                                     </ul>
                                 </div>

                     </li>
                     <li class="inactive">

                         <a href="http://msdn.microsoft.com/dn271880" title="Dev centers">Dev centers</a>

                     </li>
                     <li class="inactive">

                         <a href="http://msdn.microsoft.com/dn338064" title="Connect">Connect</a>
                                 <div class="area">
                                     <div class="arrow"></div>
                                 </div>
                                 <div style="" class="subNav">
                                     <ul>
                                                 <li><a href="http://tech-advisors.msdn.microsoft.com/en-us" title="Tech Advisors">Tech Advisors</a></li>
                                                 <li><a href="http://events.msdn.microsoft.com/en-us" title="Events">Events</a></li>
                                                 <li><a href="http://social.msdn.microsoft.com/forums/" title="Forums">Forums</a></li>
                                     </ul>
                                 </div>

                     </li>
                     <li class="inactive">

                         <a href="http://msdn.microsoft.com/dn292944" title="Downloads">Downloads</a>
                                 <div class="area">
                                     <div class="arrow"></div>
                                 </div>
                                 <div style="" class="subNav">
                                     <ul>
                                                 <li><a href="http://msdn.microsoft.com/dn369242" title="Developer tools">Developer tools</a></li>
                                                 <li><a href="http://msdn.microsoft.com/dn369240" title="SDKs">SDKs</a></li>
                                                 <li><a href="https://msdn.microsoft.com/subscriptions/manage/hh442900" title="MSDN subscriptions">MSDN subscriptions</a></li>
                                     </ul>
                                 </div>

                     </li>
                     <li class="current active">

                         <a href="http://msdn.microsoft.com/library" title="Library">Library</a>

                     </li>
                     <li class="inactive">

                         <a href="http://code.msdn.microsoft.com/" title="Samples">Samples</a>

                     </li>
            </ul>
          
        </nav>        

                </div>
                <div class="right mobile"></div>
                
                <div data-fragmentname="SocialLinks" id="Fragment_SocialLinks" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <div class="linkListTitle">Follow us</div>
    <ul class="links horizontal">
      <li>
        <a href="http://www.facebook.com/microsoftdeveloper" target="_blank" id="SocialLinks_2152_4" class="facebook" xmlns="http://www.w3.org/1999/xhtml">http://www.facebook.com/microsoftdeveloper</a>
      </li>
      <li>
        <a href="https://twitter.com/msdev" target="_blank" id="SocialLinks_2152_5" class="twitter" xmlns="http://www.w3.org/1999/xhtml">https://twitter.com/msdev</a>
      </li>
      <li>
        <a href="http://plus.google.com/111221966647232053570/" target="_blank" id="SocialLinks_2152_6" class="googlePlus" xmlns="http://www.w3.org/1999/xhtml">http://plus.google.com/111221966647232053570/</a>
      </li>
    </ul>
  </div>
</div> 
                
                <span id="singleCol"></span>
                <span id="doubleCol"></span>
            </div>
            

        </header>
    </div>
    
    

        
    <div class="printExportMenus ltr">
        <a style="display: inline;" id="isd_printABook" href="http://msdn.microsoft.com/en-us/library/export/help/?returnUrl=%2fen-us%2flibrary%2fff926074.aspx">
            Export (<span class="count">0</span>)
        </a>
        <a id="isd_print" href="http://msdn.microsoft.com/en-us/library/ff926074%28d=printer%29.aspx" rel="nofollow">
            Print 
        </a>
    </div>
    

        <div class="printExportMenus ltr">
        <a id="expandCollapseAll" href="javascript:void(0)">Collapse All</a>
    </div>

    

        
            <div id="body">
                








    <div style="width: 280px; max-width: 480px; min-height: 8268px; height: auto;" id="leftNav">



<div style="" id="tocnav">
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/ms123401.aspx" id="ms310241_MSDN.10_en-us" mtpsaliasid="" mtpsassetid="5DDC0A78-6B2C-43E3-9C56-55F45C0DFFA5_MSDN.10_en-us" mtpsshortid="ms123401_MSDN.10_en-us" title="MSDN Library">MSDN Library</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/aa187916.aspx" id="aa187916_MSDN.10_en-us" mtpsaliasid="" mtpsassetid="MSDN|devtoolslang|$\devtoolslang.hxt@0,0_MSDN.10_en-us" mtpsshortid="aa187916_MSDN.10_en-us" title="Development Tools and Languages">Development Tools and Languages</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/dd831853.aspx" id="aa187917_MSDN.10_en-us" mtpsaliasid="" mtpsassetid="ba237712-f8c4-4d13-854b-ab4a16afa309_MSDN.10_en-us" mtpsshortid="dd831853_VS.120_en-us" title="Visual Studio 2013">Visual Studio 2013</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/hh334523.aspx" id="hh793772_VS.120_en-us" mtpsaliasid="" mtpsassetid="fa9bf5e6-07c8-4b5b-b1ae-8a22816a63c6_VS.120_en-us" mtpsshortid="hh334523_VS.120_en-us" title="Visual Basic and Visual C#">Visual Basic and Visual C#</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/kx37x362.aspx" id="hh599417_VS.120_en-us" mtpsaliasid="" mtpsassetid="7f4f8103-7068-4f1d-92c7-3c4519b6edbc_VS.120_en-us" mtpsshortid="kx37x362_VS.120_en-us" title="Visual C#">Visual C#</a>            </div>
            <div style="padding-left: 0px;" class="toclevel0" data-toclevel="0">
<a class="toc_collapsed" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/67ef8sbd.aspx" id="hh599453_VS.120_en-us" mtpsaliasid="" mtpsassetid="ac0f23a2-6bf3-4077-be99-538ae5fd3bc5_VS.120_en-us" mtpsshortid="67ef8sbd_VS.120_en-us" title="C# Programming Guide">C# Programming Guide</a>            </div>
            <div data-childrenloaded="true" style="padding-left: 17px;" class="toclevel1" data-toclevel="1">
<a class="toc_expanded" href="#"></a><a data-tochassubtree="true" href="http://msdn.microsoft.com/en-us/library/0cs3416d.aspx" id="hh599421_VS.120_en-us" mtpsaliasid="" mtpsassetid="9551354b-33f0-4e11-bbf0-1a35e3702b22_VS.120_en-us" mtpsshortid="0cs3416d_VS.120_en-us" title="Inside a C# Program">Inside a C# Program</a>            </div>
            <div style="padding-left: 34px;" class="toclevel2" data-toclevel="2">
<span class="toc_empty"></span><a href="http://msdn.microsoft.com/en-us/library/k1sx6ed2.aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="Hello World -- Your First Program">Hello World -- Your First Program</a>            </div>
            <div style="padding-left: 34px;" class="toclevel2" data-toclevel="2">
<span class="toc_empty"></span><a href="http://msdn.microsoft.com/en-us/library/w2a9a9s3.aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="General Structure of a C# Program">General Structure of a C# Program</a>            </div>
            <div style="padding-left: 34px;" class="toclevel2 current" data-toclevel="2">
<span class="toc_empty"></span><a href="http://msdn.microsoft.com/en-us/library/ff926074.aspx" mtpsaliasid="" mtpsassetid="" mtpsshortid="" title="C# Coding Conventions">C# Coding Conventions</a>            </div>
</div>
        

        

        
        
        <div id="toc-resizable-ew" class="toc-resizable-ew"></div>
        

<a style="left: 280px; display: inline-block;" id="NavigationResize" href="javascript:void(0)">
    <img style="" class="cl_nav_resize_open" src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/ImageSprite.png" title="Expand" alt="Expand">
    <img style="display: none;" class="cl_nav_resize_close" src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/ImageSprite.png" title="Minimize" alt="Minimize">
</a>



    </div>
<div style="margin-left: 280px; width: auto;" id="content" class="content">






    
    

    

    


        
<div xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="topic" xmlns="http://www.w3.org/1999/xhtml" xmlns:mtps="http://msdn2.microsoft.com/mtps" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:cs="http://msdn.microsoft.com/en-us/">
    <h1 class="title">C# Coding Conventions (C# Programming Guide)</h1>
    
    <div class="lw_vs">
      <div id="curversion">
        <strong>
            Visual Studio 2013 
        </strong>
      </div>
      <div id="versionclick">
        <div id="vsseperator" class="cl_lw_vs_seperator"></div>
        <div>
          <div>
            <a id="vsLink" href="javascript:;">
                        Other Versions
                    </a>
          </div>
          <div class="cl_vs_arrow clip10x10">
            <img class="cl_lw_vs_arrow" id="vsArrow" alt="" src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/ImageSprite.png">
          </div>
        </div>
        <ul style="display: none;" id="vsPanel">
          <li>
            <a href="http://msdn.microsoft.com/en-us/library/ff926074%28v=vs.110%29.aspx" title="">Visual Studio 2012</a>
          </li>
          <li>
            <a href="http://msdn.microsoft.com/en-us/library/ff926074%28v=vs.100%29.aspx" title="">Visual Studio 2010</a>
          </li>
        </ul>
      </div>
    <div id="ratingCounterSeperator" class="cl_lw_vs_seperator" style="display: block;"></div><div style="margin: 0px 0px 0px 13px; display: block;" id="ratingCounter">
        <span id="rcA" class="ratingText">
            21 out of 30 rated this helpful <span id="rateThisPrefix">- </span><a id="rateThisTopic" href="#feedback" title="Rate this topic">Rate this topic</a>
            
        </span>
    </div></div>
    <div style="clear:both;"></div>
    
    <div id="mainSection">
      <div id="mainBody">
        <div class="introduction">
          <p>The <a href="http://go.microsoft.com/fwlink/?LinkId=199552" target="_blank">C# Language Specification</a>
 does not define a coding standard. However, the guidelines in this 
topic are used by Microsoft to develop samples and documentation. </p>
          <p>Coding conventions serve the following purposes:</p>
          <ul>
            <li>
              <p>They create a consistent look to the code, so that readers can focus on content, not layout. </p>
            </li>
            <li>
              <p>They enable readers to understand the code more quickly by making assumptions based on previous experience.</p>
            </li>
            <li>
              <p>They facilitate copying, changing, and maintaining the code. </p>
            </li>
            <li>
              <p>They demonstrate C# best practices. </p>
            </li>
          </ul>
        </div>
        <div>
          
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">Naming Conventions</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="sectionToggle0">
              
            </a>
            <ul>
              <li>
                <p>In short examples that do not include <a href="http://msdn.microsoft.com/en-us/library/sf0df423.aspx">using directives</a>,
 use namespace qualifications. If you know that a namespace is imported 
by default in a project, you do not have to fully qualify the names from
 that namespace. Qualified names can be broken after a dot (.) if they 
are too long for a single line, as shown in the following example. </p>
                <div>
<div id="code-snippet-1" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_ccae1489-159d-4b39-93df-4b00ddcd7eea');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_ccae1489-159d-4b39-93df-4b00ddcd7eea" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> currentPerformanceCounterCategory = <span style="color:Blue;">new</span> System.Diagnostics.
    PerformanceCounterCategory();
</pre></div>
            
        </div>
    </div>
</div>
</div>
              </li>
              <li>
                <p>You do not have to change the names of objects that 
were created by using the Visual Studio designer tools to make them fit 
other guidelines. </p>
              </li>
            </ul>
          </div>
        </div>
        <div>
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">Layout Conventions</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="sectionToggle1">
              
            </a>
            <p>Good layout uses formatting to emphasize the structure of
 your code and to make the code easier to read. Microsoft examples and 
samples conform to the following conventions: </p>
            <ul>
              <li>
                <p>Use the default Code Editor settings (smart indenting, four-character indents, tabs saved as spaces). For more information, see <span><a href="http://msdn.microsoft.com/en-us/library/03864tbz.aspx">Options,Text Editor, C#, Formatting</a></span>.</p>
              </li>
              <li>
                <p>Write only one statement per line. </p>
              </li>
              <li>
                <p>Write only one declaration per line. </p>
              </li>
              <li>
                <p>If continuation lines are not indented automatically, indent them one tab stop (four spaces).</p>
              </li>
              <li>
                <p>Add at least one blank line between method definitions and property definitions.</p>
              </li>
              <li>
                <p>Use parentheses to make clauses in an expression apparent, as shown in the following code.</p>
                <div>
<div id="code-snippet-2" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_aab06c30-7442-415b-bb6b-c83711cfb6c6');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_aab06c30-7442-415b-bb6b-c83711cfb6c6" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">if</span> ((val1 &gt; val2) &amp;&amp; (val1 &gt; val3))
{
    <span style="color:Green;">// Take appropriate action.</span>
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
              </li>
            </ul>
          </div>
        </div>
        <div>
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">Commenting Conventions</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="sectionToggle2">
              
            </a>
            <ul>
              <li>
                <p>Place the comment on a separate line, not at the end of a line of code.</p>
              </li>
              <li>
                <p>Begin comment text with an uppercase letter. </p>
              </li>
              <li>
                <p>End comment text with a period. </p>
              </li>
              <li>
                <p>Insert one space between the comment delimiter (//) and the comment text, as shown in the following example.</p>
                <div>
<div id="code-snippet-3" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_f5c7604a-0fb2-42b0-93c3-a449a53b0338');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_f5c7604a-0fb2-42b0-93c3-a449a53b0338" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// The following declaration creates a query. It does not run&nbsp;</span>
<span style="color:Green;">// the query.</span>
</pre></div>
            
        </div>
    </div>
</div>
</div>
              </li>
              <li>
                <p>Do not create formatted blocks of asterisks around comments. </p>
              </li>
            </ul>
          </div>
        </div>
        <div>
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">Language Guidelines</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="sectionToggle3">
              
            </a>
            <p>The following sections describe practices that the C# team follows to prepare code examples and samples.</p>
            <div>
              
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">String Data Type</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle4">
                  
                </a>
                <ul>
                  <li>
                    <p>Use the <span><span class="input">+</span></span> operator to concatenate short strings, as shown in the following code. </p>
                    <div>
<div id="code-snippet-4" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_27146130-486b-4a5b-91b1-3c7d4273034a');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_27146130-486b-4a5b-91b1-3c7d4273034a" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">string</span> displayName = nameList[n].LastName + <span style="color:#A31515;">", "</span> + nameList[n].FirstName;
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>To append strings in loops, especially when you are working with large amounts of text, use a <span><a href="http://msdn.microsoft.com/en-us/library/system.text.stringbuilder.aspx">StringBuilder</a></span> object.</p>
                    <div>
<div id="code-snippet-5" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_a267f1c5-b63a-4409-a70a-29efdf444a12');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_a267f1c5-b63a-4409-a70a-29efdf444a12" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> phrase = <span style="color:#A31515;">"lalalalalalalalalalalalalalalalalalalalalalalalalalalalalala"</span>;
<span style="color:Blue;">var</span> manyPhrases = <span style="color:Blue;">new</span> StringBuilder();
<span style="color:Blue;">for</span> (<span style="color:Blue;">var</span> i = 0; i &lt; 10000; i++)
{
    manyPhrases.Append(phrase);
}
<span style="color:Green;">//Console.WriteLine("tra" + manyPhrases);</span>
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">Implicitly Typed Local Variables</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle5">
                  
                </a>
                <ul>
                  <li>
                    <p>Use <a href="http://msdn.microsoft.com/en-us/library/bb384061.aspx">implicit typing</a>
 for local variables when the type of the variable is obvious from the 
right side of the assignment, or when the precise type is not important.</p>
                    <div>
<div id="code-snippet-6" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_61949653-1b13-456b-8235-2e60eee6eddc');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_61949653-1b13-456b-8235-2e60eee6eddc" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// When the type of a variable is clear from the context, use var &nbsp;</span>
<span style="color:Green;">// in the declaration.&nbsp;</span>
<span style="color:Blue;">var</span> var1 = <span style="color:#A31515;">"This is clearly a string."</span>;
<span style="color:Blue;">var</span> var2 = 27;
<span style="color:Blue;">var</span> var3 = Convert.ToInt32(Console.ReadLine());
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Do not use <a href="http://msdn.microsoft.com/en-us/library/bb383973.aspx">var</a> when the type is not apparent from the right side of the assignment.</p>
                    <div>
<div id="code-snippet-7" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_bb485288-840e-4d2a-ab33-dc5a2ab7403f');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_bb485288-840e-4d2a-ab33-dc5a2ab7403f" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// When the type of a variable is not clear from the context, use an&nbsp;</span>
<span style="color:Green;">// explicit type.&nbsp;</span>
<span style="color:Blue;">int</span> var4 = ExampleClass.ResultSoFar();
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Do not rely on the variable name to specify the type of the variable. It might not be correct.</p>
                    <div>
<div id="code-snippet-8" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_0d690a96-080b-419c-92cd-99f3f4930096');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_0d690a96-080b-419c-92cd-99f3f4930096" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// Naming the following variable inputInt is misleading. &nbsp;</span>
<span style="color:Green;">// It is a string.&nbsp;</span>
<span style="color:Blue;">var</span> inputInt = Console.ReadLine();
Console.WriteLine(inputInt);
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Avoid the use of <span><span class="input">var</span></span> in place of <a href="http://msdn.microsoft.com/en-us/library/dd264741.aspx">dynamic</a>.</p>
                  </li>
                  <li>
                    <p>Use implicit typing to determine the type of the loop variable in <a href="http://msdn.microsoft.com/en-us/library/ch45axte.aspx">for</a> and <a href="http://msdn.microsoft.com/en-us/library/ttw7t8t6.aspx">foreach</a> loops.</p>
                    <p>The following example uses implicit typing in a <span><span class="input">for</span></span> statement.</p>
                    <div>
<div id="code-snippet-9" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_1d7fa174-dcdb-40eb-93ed-c89b236aef8e');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_1d7fa174-dcdb-40eb-93ed-c89b236aef8e" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> syllable = <span style="color:#A31515;">"ha"</span>;
<span style="color:Blue;">var</span> laugh = <span style="color:#A31515;">""</span>;
<span style="color:Blue;">for</span> (<span style="color:Blue;">var</span> i = 0; i &lt; 10; i++)
{
    laugh += syllable;
    Console.WriteLine(laugh);
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                    <p>The following example uses implicit typing in a <span><span class="input">foreach</span></span> statement.</p>
                    <div>
<div id="code-snippet-10" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_62230e52-89b7-4861-ab02-f42e2afd6dbb');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_62230e52-89b7-4861-ab02-f42e2afd6dbb" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">foreach</span> (<span style="color:Blue;">var</span> ch <span style="color:Blue;">in</span> laugh)
{
    <span style="color:Blue;">if</span> (ch == <span style="color:#A31515;">'h'</span>)
        Console.Write(<span style="color:#A31515;">"H"</span>);
    <span style="color:Blue;">else</span>
        Console.Write(ch);
}
Console.WriteLine();
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">Unsigned Data Type</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle6">
                  
                </a>
                <ul>
                  <li>
                    <p>In general, use <span><span class="input">int</span></span> rather than unsigned types. The use of <span><span class="input">int</span></span> is common throughout C#, and it is easier to interact with other libraries when you use <span><span class="input">int</span></span>. </p>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">Arrays</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle7">
                  
                </a>
                <ul>
                  <li>
                    <p>Use the concise syntax when you initialize arrays on the declaration line.</p>
                    <div>
<div id="code-snippet-11" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_ce0272eb-f0da-4775-a918-3c0092f5c567');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_ce0272eb-f0da-4775-a918-3c0092f5c567" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// Preferred syntax. Note that you cannot use var here instead of string[].&nbsp;</span>
<span style="color:Blue;">string</span>[] vowels1 = { <span style="color:#A31515;">"a"</span>, <span style="color:#A31515;">"e"</span>, <span style="color:#A31515;">"i"</span>, <span style="color:#A31515;">"o"</span>, <span style="color:#A31515;">"u"</span> };


<span style="color:Green;">// If you use explicit instantiation, you can use var.&nbsp;</span>
<span style="color:Blue;">var</span> vowels2 = <span style="color:Blue;">new</span>&nbsp;<span style="color:Blue;">string</span>[] { <span style="color:#A31515;">"a"</span>, <span style="color:#A31515;">"e"</span>, <span style="color:#A31515;">"i"</span>, <span style="color:#A31515;">"o"</span>, <span style="color:#A31515;">"u"</span> };

<span style="color:Green;">// If you specify an array size, you must initialize the elements one at a time.&nbsp;</span>
<span style="color:Blue;">var</span> vowels3 = <span style="color:Blue;">new</span>&nbsp;<span style="color:Blue;">string</span>[5];
vowels3[0] = <span style="color:#A31515;">"a"</span>;
vowels3[1] = <span style="color:#A31515;">"e"</span>;
<span style="color:Green;">// And so on.</span>
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">Delegates</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle8">
                  
                </a>
                <ul>
                  <li>
                    <p>Use the concise syntax to create instances of a delegate type.</p>
                    <div>
<div id="code-snippet-12" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_2add66af-85f9-415b-af69-825989b8d3c2');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_2add66af-85f9-415b-af69-825989b8d3c2" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// First, in class Program, define the delegate type and a method that  &nbsp;</span>
<span style="color:Green;">// has a matching signature.&nbsp;</span>

<span style="color:Green;">// Define the type.&nbsp;</span>
<span style="color:Blue;">public</span>&nbsp;<span style="color:Blue;">delegate</span>&nbsp;<span style="color:Blue;">void</span> Del(<span style="color:Blue;">string</span> message);

<span style="color:Green;">// Define a method that has a matching signature.&nbsp;</span>
<span style="color:Blue;">public</span>&nbsp;<span style="color:Blue;">static</span>&nbsp;<span style="color:Blue;">void</span> DelMethod(<span style="color:Blue;">string</span> str)
{
    Console.WriteLine(<span style="color:#A31515;">"DelMethod argument: {0}"</span>, str);
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                    <div>
<div id="code-snippet-13" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_f0aeae67-7283-46fe-b811-012901e3f1cd');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_f0aeae67-7283-46fe-b811-012901e3f1cd" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// In the Main method, create an instance of Del.&nbsp;</span>

<span style="color:Green;">// Preferred: Create an instance of Del by using condensed syntax.</span>
Del exampleDel2 = DelMethod;

<span style="color:Green;">// The following declaration uses the full syntax.</span>
Del exampleDel1 = <span style="color:Blue;">new</span> Del(DelMethod);
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">try-catch and using Statements in Exception Handling</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle9">
                  
                </a>
                <ul>
                  <li>
                    <p>Use a <a href="http://msdn.microsoft.com/en-us/library/0yd65esw.aspx">try-catch</a> statement for most exception handling.</p>
                    <div>
<div id="code-snippet-14" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_b195ca5b-3a18-464b-8ed2-d9a97c7c5570');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_b195ca5b-3a18-464b-8ed2-d9a97c7c5570" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">static</span>&nbsp;<span style="color:Blue;">string</span> GetValueFromArray(<span style="color:Blue;">string</span>[] array, <span style="color:Blue;">int</span> index)
{
    <span style="color:Blue;">try</span>
    {
        <span style="color:Blue;">return</span> array[index];
    }
    <span style="color:Blue;">catch</span> (System.IndexOutOfRangeException ex)
    {
        Console.WriteLine(<span style="color:#A31515;">"Index is out of range: {0}"</span>, index);
        <span style="color:Blue;">throw</span>;
    }
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Simplify your code by using the C# <a href="http://msdn.microsoft.com/en-us/library/yh598w02.aspx">using statement</a>. If you have a <a href="http://msdn.microsoft.com/en-us/library/zwc8s4fz.aspx">try-finally</a> statement in which the only code in the <span><span class="input">finally</span></span> block is a call to the <span><a href="http://msdn.microsoft.com/en-us/library/system.idisposable.dispose.aspx">Dispose</a></span> method, use a <span><span class="input">using</span></span> statement instead.</p>
                    <div>
<div id="code-snippet-15" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_c1248c16-34d4-454d-be3c-5d859d829bf9');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_c1248c16-34d4-454d-be3c-5d859d829bf9" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// This try-finally statement only calls Dispose in the finally block.</span>
Font font1 = <span style="color:Blue;">new</span> Font(<span style="color:#A31515;">"Arial"</span>, 10.0f);
<span style="color:Blue;">try</span>
{
    <span style="color:Blue;">byte</span> charset = font1.GdiCharSet;
}
<span style="color:Blue;">finally</span>
{
    <span style="color:Blue;">if</span> (font1 != <span style="color:Blue;">null</span>)
    {
        ((IDisposable)font1).Dispose();
    }
}


<span style="color:Green;">// You can do the same thing with a using statement.&nbsp;</span>
<span style="color:Blue;">using</span> (Font font2 = <span style="color:Blue;">new</span> Font(<span style="color:#A31515;">"Arial"</span>, 10.0f))
{
    <span style="color:Blue;">byte</span> charset = font2.GdiCharSet;
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">&amp;&amp; and || Operators</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle10">
                  
                </a>
                <ul>
                  <li>
                    <p>To avoid exceptions and increase performance by skipping unnecessary comparisons, use <a href="http://msdn.microsoft.com/en-us/library/2a723cdk.aspx">&amp;&amp;</a> instead of <a href="http://msdn.microsoft.com/en-us/library/sbf85k1c.aspx">&amp;</a> and <a href="http://msdn.microsoft.com/en-us/library/6373h346.aspx">||</a> instead of <a href="http://msdn.microsoft.com/en-us/library/kxszd0kx.aspx">|</a> when you perform comparisons, as shown in the following example.</p>
                    <div>
<div id="code-snippet-16" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_30c6576d-6f90-4732-a589-c4fcb3629f6f');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_30c6576d-6f90-4732-a589-c4fcb3629f6f" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre>Console.Write(<span style="color:#A31515;">"Enter a dividend: "</span>);
<span style="color:Blue;">var</span> dividend = Convert.ToInt32(Console.ReadLine());

Console.Write(<span style="color:#A31515;">"Enter a divisor: "</span>);
<span style="color:Blue;">var</span> divisor = Convert.ToInt32(Console.ReadLine());

<span style="color:Green;">// If the divisor is 0, the second clause in the following condition&nbsp;</span>
<span style="color:Green;">// causes a run-time error. The &amp;&amp; operator short circuits when the&nbsp;</span>
<span style="color:Green;">// first expression is false. That is, it does not evaluate the&nbsp;</span>
<span style="color:Green;">// second expression. The &amp; operator evaluates both, and causes &nbsp;</span>
<span style="color:Green;">// a run-time error when divisor is 0.&nbsp;</span>
<span style="color:Blue;">if</span> ((divisor != 0) &amp;&amp; (dividend / divisor &gt; 0))
{
    Console.WriteLine(<span style="color:#A31515;">"Quotient: {0}"</span>, dividend / divisor);
}
<span style="color:Blue;">else</span>
{
    Console.WriteLine(<span style="color:#A31515;">"Attempted division by 0 ends up here."</span>);
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">New Operator</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle11">
                  
                </a>
                <ul>
                  <li>
                    <p>Use the concise form of object instantiation, with implicit typing, as shown in the following declaration.</p>
                    <div>
<div id="code-snippet-17" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_da53ee6a-e225-4582-a5c8-e39bf8165279');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_da53ee6a-e225-4582-a5c8-e39bf8165279" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> instance1 = <span style="color:Blue;">new</span> ExampleClass();
</pre></div>
            
        </div>
    </div>
</div>
</div>
                    <p>The previous line is equivalent to the following declaration. </p>
                    <div>
<div id="code-snippet-18" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_3bde9820-6749-4584-a751-9bdc54d5e015');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_3bde9820-6749-4584-a751-9bdc54d5e015" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre>ExampleClass instance2 = <span style="color:Blue;">new</span> ExampleClass();
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Use object initializers to simplify object creation.</p>
                    <div>
<div id="code-snippet-19" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_0f1435ab-7e19-4700-90b8-dafbeefd98dd');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_0f1435ab-7e19-4700-90b8-dafbeefd98dd" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// Object initializer.&nbsp;</span>
<span style="color:Blue;">var</span> instance3 = <span style="color:Blue;">new</span> ExampleClass { Name = <span style="color:#A31515;">"Desktop"</span>, ID = 37414, 
    Location = <span style="color:#A31515;">"Redmond"</span>, Age = 2.3 };

<span style="color:Green;">// Default constructor and assignment statements.&nbsp;</span>
<span style="color:Blue;">var</span> instance4 = <span style="color:Blue;">new</span> ExampleClass();
instance4.Name = <span style="color:#A31515;">"Desktop"</span>;
instance4.ID = 37414;
instance4.Location = <span style="color:#A31515;">"Redmond"</span>;
instance4.Age = 2.3;
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">Event Handling</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle12">
                  
                </a>
                <ul>
                  <li>
                    <p>If you are defining an event handler that you do not need to remove later, use a lambda expression.</p>
                    <div>
<div id="code-snippet-20" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_5c6c49e0-98ac-459b-be38-d2ede5c3e6f1');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_5c6c49e0-98ac-459b-be38-d2ede5c3e6f1" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">public</span> Form2()
{
    <span style="color:Green;">// You can use a lambda expression to define an event handler.&nbsp;</span>
    <span style="color:Blue;">this</span>.Click += (s, e) =&gt;
        {
            MessageBox.Show(
                ((MouseEventArgs)e).Location.ToString());
        };
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                    <div>
<div id="code-snippet-21" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_6d93f9a7-3a53-4287-b0a0-b8e6f2487ae9');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_6d93f9a7-3a53-4287-b0a0-b8e6f2487ae9" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// Using a lambda expression shortens the following traditional definition.&nbsp;</span>
<span style="color:Blue;">public</span> Form1()
{
    <span style="color:Blue;">this</span>.Click += <span style="color:Blue;">new</span> EventHandler(Form1_Click);
}

<span style="color:Blue;">void</span> Form1_Click(<span style="color:Blue;">object</span> sender, EventArgs e)
{
    MessageBox.Show(((MouseEventArgs)e).Location.ToString());
}
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">Static Members</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle13">
                  
                </a>
                <ul>
                  <li>
                    <p>Call <a href="http://msdn.microsoft.com/en-us/library/98f28cdx.aspx">static</a> members by using the class name: <span class="parameter">ClassName.StaticMember</span>. Do not access a static member that is defined in a base class from a derived class.</p>
                  </li>
                </ul>
              </div>
            </div>
            <div>
              <div class="LW_CollapsibleArea_TitleDiv">
                <div>
                  <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                    <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                    <span class="LW_CollapsibleArea_Title">LINQ Queries</span>
                  </a>
                  <div class="LW_CollapsibleArea_HrDiv">
                    <hr class="LW_CollapsibleArea_Hr">
                  </div>
                </div>
              </div>
              <div class="sectionblock">
                <a id="sectionToggle14">
                  
                </a>
                <ul>
                  <li>
                    <p>Use meaningful names for query variables. The following example uses <span class="code">seattleCustomers</span> for customers who are located in Seattle.</p>
                    <div>
<div id="code-snippet-22" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_6890accd-4e2f-4391-8d6e-8fc58879ef81');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_6890accd-4e2f-4391-8d6e-8fc58879ef81" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> seattleCustomers = <span style="color:Blue;">from</span> cust <span style="color:Blue;">in</span> customers
                       <span style="color:Blue;">where</span> cust.City == <span style="color:#A31515;">"Seattle"</span>&nbsp;
                       <span style="color:Blue;">select</span> cust.Name;
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Use aliases to make sure that property names of anonymous types are correctly capitalized, using Pascal casing.</p>
                    <div>
<div id="code-snippet-23" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_03ad25e8-08d9-476a-803f-a90ef3200676');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_03ad25e8-08d9-476a-803f-a90ef3200676" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> localDistributors =
    <span style="color:Blue;">from</span> customer <span style="color:Blue;">in</span> customers
    <span style="color:Blue;">join</span> distributor <span style="color:Blue;">in</span> distributors <span style="color:Blue;">on</span> customer.City <span style="color:Blue;">equals</span> distributor.City
    <span style="color:Blue;">select</span>&nbsp;<span style="color:Blue;">new</span> { Customer = customer, Distributor = distributor };
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Rename properties when the property names in the 
result would be ambiguous. For example, if your query returns a customer
 name and a distributor ID, instead of leaving them as <span class="code">Name</span> and <span class="code">ID</span> in the result, rename them to clarify that <span class="code">Name</span> is the name of a customer, and <span class="code">ID</span> is the ID of a distributor.</p>
                    <div>
<div id="code-snippet-24" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_626ece6c-c6b0-47f8-95ef-4145da9bc4de');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_626ece6c-c6b0-47f8-95ef-4145da9bc4de" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> localDistributors2 =
    <span style="color:Blue;">from</span> cust <span style="color:Blue;">in</span> customers
    <span style="color:Blue;">join</span> dist <span style="color:Blue;">in</span> distributors <span style="color:Blue;">on</span> cust.City <span style="color:Blue;">equals</span> dist.City
    <span style="color:Blue;">select</span>&nbsp;<span style="color:Blue;">new</span> { CustomerName = cust.Name, DistributorID = dist.ID };
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Use implicit typing in the declaration of query variables and range variables.</p>
                    <div>
<div id="code-snippet-25" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_552588e8-9de3-4327-a892-7c46c2d808ab');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_552588e8-9de3-4327-a892-7c46c2d808ab" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> seattleCustomers = <span style="color:Blue;">from</span> cust <span style="color:Blue;">in</span> customers
                       <span style="color:Blue;">where</span> cust.City == <span style="color:#A31515;">"Seattle"</span>&nbsp;
                       <span style="color:Blue;">select</span> cust.Name;
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Align query clauses under the <a href="http://msdn.microsoft.com/en-us/library/bb383978.aspx">from </a> clause, as shown in the previous examples.</p>
                  </li>
                  <li>
                    <p>Use <a href="http://msdn.microsoft.com/en-us/library/bb311043.aspx">where</a> clauses before other query clauses to ensure that later query clauses operate on the reduced, filtered set of data.</p>
                    <div>
<div id="code-snippet-26" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_eac88616-4995-4d9c-b035-6d41a288cf4c');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_eac88616-4995-4d9c-b035-6d41a288cf4c" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Blue;">var</span> seattleCustomers2 = <span style="color:Blue;">from</span> cust <span style="color:Blue;">in</span> customers
                        <span style="color:Blue;">where</span> cust.City == <span style="color:#A31515;">"Seattle"</span>&nbsp;
                        <span style="color:Blue;">orderby</span> cust.Name
                        <span style="color:Blue;">select</span> cust;
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                  <li>
                    <p>Use multiple <span><span class="input">from</span></span> clauses instead of a <a href="http://msdn.microsoft.com/en-us/library/bb311040.aspx">join</a> clause to access inner collections. For example, a collection of <span class="code">Student</span>
 objects might each contain a collection of test scores. When the 
following query is executed, it returns each score that is over 90, 
along with the last name of the student who received the score.</p>
                    <div>
<div id="code-snippet-27" class="codeSnippetContainer" xmlns="">
    <div class="codeSnippetContainerTabs">
        <div class="codeSnippetContainerTabSingle" dir="ltr"><a>C#</a></div>
    </div>
    <div class="codeSnippetContainerCodeContainer">
        <div class="codeSnippetToolBar">
            <div class="codeSnippetToolBarText">
                <a name="CodeSnippetCopyLink" style="display: none;" title="Copy to clipboard." href="javascript:if%20(window.epx.codeSnippet)window.epx.codeSnippet.copyCode('CodeSnippetContainerCode_8bbd9d33-9218-4b18-b2f7-500aad04ab64');">Copy</a>
            </div>
        </div>
        <div id="CodeSnippetContainerCode_8bbd9d33-9218-4b18-b2f7-500aad04ab64" class="codeSnippetContainerCode" dir="ltr">
            <div style="color:Black;"><pre><span style="color:Green;">// Use a compound from to access the inner sequence within each element.&nbsp;</span>
<span style="color:Blue;">var</span> scoreQuery = <span style="color:Blue;">from</span> student <span style="color:Blue;">in</span> students
                 <span style="color:Blue;">from</span> score <span style="color:Blue;">in</span> student.Scores
                 <span style="color:Blue;">where</span> score &gt; 90
                 <span style="color:Blue;">select</span>&nbsp;<span style="color:Blue;">new</span> { Last = student.LastName, score };
</pre></div>
            
        </div>
    </div>
</div>
</div>
                  </li>
                </ul>
              </div>
            </div>
          </div>
        </div>
        <div>
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">Security</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="sectionToggle15">
              
            </a>
            <p>Follow the guidelines in <span><a href="http://msdn.microsoft.com/en-us/library/8a3x2b7f.aspx">Secure Coding Guidelines</a></span>.</p>
          </div>
        </div>
        <div>
          <div class="LW_CollapsibleArea_TitleDiv">
            <div>
              <a href="javascript:void(0)" class="LW_CollapsibleArea_TitleAhref" title="Click to collapse. Double-click to collapse all.">
                <span class="cl_CollapsibleArea_expanding LW_CollapsibleArea_Img"></span>
                <span class="LW_CollapsibleArea_Title">See Also</span>
              </a>
              <div class="LW_CollapsibleArea_HrDiv">
                <hr class="LW_CollapsibleArea_Hr">
              </div>
            </div>
          </div>
          <div class="sectionblock">
            <a id="seeAlsoToggle">
              
            </a>
            <h4 class="subHeading">Concepts</h4>
            <div class="seeAlsoStyle">
              <span>
                <a href="http://msdn.microsoft.com/en-us/library/h63fsef3.aspx">Visual Basic Coding Conventions</a>
              </span>
            </div>
            <h4 class="subHeading">Other Resources</h4>
            <div class="seeAlsoStyle">
              <span>
                <a href="http://msdn.microsoft.com/en-us/library/8a3x2b7f.aspx">Secure Coding Guidelines</a>
              </span>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

    




<div class="libraryMemberFilter">
    <div class="filterContainer">
        <span>Show:</span>
        <label>
            <input class="libraryFilterInherited" checked="checked" value="Inherit" type="checkbox">Inherited
        </label>
        <label>
            <input class="libraryFilterProtected" checked="checked" value="Protected" type="checkbox">Protected
        </label>
    </div>
</div>
    
<input id="libraryMemberFilterEmptyWarning" value="There are no members available with your current filter settings." type="hidden">


 
</div>


            </div>
            <div class="clear"></div>
        
            
    
<input name="__RequestVerificationToken" value="K975QsIQbMMvN2F73XwAc6FoLF0wP0MknifpEeizDQ8o66ZiKW_WARlWMnpLky15GhV0JM8mHwuaRrYxMj14dMOlLdU1" type="hidden">
<input id="ratingSubmitUrl" value="http://msdn.microsoft.com/en-us/library/feedback/add/ff926074.aspx" type="hidden">
<input id="isTopicRated" value="false" type="hidden">




        
    <link type="text/css" rel="stylesheet">
    
    <div id="ux-footer" class="" style="" dir="ltr">
        <footer class="top">
            <div data-fragmentname="LeftLinks" id="Fragment_LeftLinks" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <div class="linkListTitle">Dev centers</div>
    <ul class="links">
      <li>
        <a href="http://msdn.microsoft.com/windows" id="LeftLinks_2148_1" class="windowsBlue" xmlns="http://www.w3.org/1999/xhtml">Windows</a>
      </li>
      <li>
        <a href="http://dev.windowsphone.com/" id="LeftLinks_2148_2" class="windowsPurple" xmlns="http://www.w3.org/1999/xhtml">Windows Phone</a>
      </li>
      <li>
        <a href="http://msdn.microsoft.com/office" id="LeftLinks_2148_3" class="office" xmlns="http://www.w3.org/1999/xhtml">Office</a>
      </li>
      <li>
        <a href="http://msdn.microsoft.com/vstudio" id="LeftLinks_2148_4" class="visualStudio" xmlns="http://www.w3.org/1999/xhtml">Visual Studio</a>
      </li>
      <li>
        <a href="http://developer.nokia.com/" title="Nokia" id="LeftLinks_2148_15" class="nokia" xmlns="http://www.w3.org/1999/xhtml">Nokia</a>
      </li>
      <li>
        <a href="http://azure.microsoft.com/en-us/documentation/" target="_blank" id="LeftLinks_2148_12" xmlns="http://www.w3.org/1999/xhtml">Microsoft Azure</a>
      </li>
      <li>
        <a href="http://msdn.microsoft.com/aa937802" id="LeftLinks_2148_5" xmlns="http://www.w3.org/1999/xhtml">More...</a>
      </li>
    </ul>
  </div>
</div>    
            <div id="rightLinks">
                <div data-fragmentname="CenterLinks1" id="Fragment_CenterLinks1" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <div class="linkListTitle">Learning resources</div>
    <ul class="links">
      <li>
        <a href="http://www.microsoftvirtualacademy.com/" id="CenterLinks1_2151_4" xmlns="http://www.w3.org/1999/xhtml">Microsoft Virtual Academy</a>
      </li>
      <li>
        <a href="http://channel9.msdn.com/" id="CenterLinks1_2151_5" xmlns="http://www.w3.org/1999/xhtml">Channel 9</a>
      </li>
      <li>
        <a href="http://www.interoperabilitybridges.com/" id="CenterLinks1_2151_6" xmlns="http://www.w3.org/1999/xhtml">Interoperability Bridges</a>
      </li>
      <li>
        <a href="http://msdn.microsoft.com/magazine/" id="CenterLinks1_2151_7" xmlns="http://www.w3.org/1999/xhtml">MSDN Magazine</a>
      </li>
    </ul>
  </div>
</div>
                <div data-fragmentname="CenterLinks2" id="Fragment_CenterLinks2" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <div class="linkListTitle">Community</div>
    <ul class="links">
      <li>
        <a href="http://social.msdn.microsoft.com/forums/en-us/home" id="CenterLinks2_2151_8" xmlns="http://www.w3.org/1999/xhtml">Forums</a>
      </li>
      <li>
        <a href="http://blogs.msdn.com/b/developer-tools/" id="CenterLinks2_2151_9" xmlns="http://www.w3.org/1999/xhtml">Blogs</a>
      </li>
      <li>
        <a href="http://www.codeplex.com/" id="CenterLinks2_2151_10" xmlns="http://www.w3.org/1999/xhtml">Codeplex</a>
      </li>
    </ul>
  </div>
</div>
                <div data-fragmentname="CenterLinks3" id="Fragment_CenterLinks3" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <div class="linkListTitle">Support</div>
    <ul class="links">
      <li>
        <a href="http://msdn.microsoft.com/hh361695" id="CenterLinks3_2151_11" xmlns="http://www.w3.org/1999/xhtml">Self support</a>
      </li>
      <li>
        <a href="http://support.microsoft.com/" id="CenterLinks3_2151_12" xmlns="http://www.w3.org/1999/xhtml">Other support options</a>
      </li>
    </ul>
  </div>
</div>
                <div class="nth-child-4n" data-fragmentname="CenterLinks4" id="Fragment_CenterLinks4" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <div class="linkListTitle">Programs</div>
    <ul class="links">
      <li>
        <a href="http://www.microsoft.com/bizspark/" id="CenterLinks4_2151_13" xmlns="http://www.w3.org/1999/xhtml">BizSpark (for startups)</a>
      </li>
      <li>
        <a href="https://www.dreamspark.com/" id="CenterLinks4_2151_14" xmlns="http://www.w3.org/1999/xhtml">DreamSpark</a>
      </li>
      <li>
        <a href="https://www.microsoft.com/faculty" id="CenterLinks4_2151_15" xmlns="http://www.w3.org/1999/xhtml">Faculty Connection</a>
      </li>
      <li>
        <a href="http://www.microsoft.com/student/" id="CenterLinks4_2151_16" xmlns="http://www.w3.org/1999/xhtml">Microsoft Student</a>
      </li>
    </ul>
  </div>
</div>
    
    <div class="feedbackContainer">
        <div id="feedbackSection1" class="clear">
            <div class="left">Did you find this helpful?</div>
            <div class="left">
                <div class="left">
                    <input name="feedback" id="feedbackYes" value="1" class="feedbackYesClick" data-enhance="false" type="radio"><label class="feedbackYesClick" for="feedbackYes"> Yes</label>
                </div>
                <div class="left">
                    <input name="feedback" id="feedbackNo" value="0" class="feedbackNoClick" data-enhance="false" type="radio"><label class="feedbackNoClick" for="feedbackNo"> No</label>
                </div>
            </div>
            <a class="rateThisAnchor" name="feedback"></a>
        </div>
        <div id="feedbackSection2" class="clear">
        </div>
        <div id="feedbackSection3" class="clear">
                    <div>
                        <input id="checkboxNo201" name="chkbxNo" value="201" data-enhance="false" type="checkbox">
                        <label for="checkboxNo201">Not accurate</label>
                    </div>
                    <div>
                        <input id="checkboxNo202" name="chkbxNo" value="202" data-enhance="false" type="checkbox">
                        <label for="checkboxNo202">Not enough depth</label>
                    </div>
                    <div>
                        <input id="checkboxNo203" name="chkbxNo" value="203" data-enhance="false" type="checkbox">
                        <label for="checkboxNo203">Need more code examples</label>
                    </div>
        </div>
        <div id="feedbackSection4" class="clear">
            <div>
                <textarea id="feedbackTextArea" name="feedbackText" class="TellUsMoreTextBoxSearchLoaded" data-enhance="false">Tell us more...</textarea>
            </div>
            <div class="left"><span class="counter">(<span id="feedbackTextCounter">1500</span> characters remaining)</span></div>
            <div class="right">
                <button type="button" id="feedbackSubmit" title="Click to Submit Feedback" data-enhance="false">Submit</button>
            </div>
        </div>
        <div id="feedbackSection5">Thank you for your feedback</div>
        <input id="feedbackValue" value="" type="hidden">
        <input id="tellUsMoreText" value="Tell us more..." type="hidden">
        <input id="maxTextBoxCharacters" value="1500" type="hidden">
        <input id="submitUrl" value="/en-us/msdn/ux/uxservices/feedback/add/footer" type="hidden">
        <input id="feedbackSiteName" name="feedbackSiteName" value="" type="hidden">
        <input id="feedbackPriority" name="feedbackPriority" value="" type="hidden">
        <input id="feedbackSourceUrl" name="feedbackSourceUrl" value="" type="hidden">
        <input id="ClientIP" name="ClientIP" value="" type="hidden">
        <input id="ClientOS" name="ClientOS" value="" type="hidden">
        <input id="ClientBrowser" name="ClientBrowser" value="" type="hidden">
        <input id="ClientTime" name="ClientTime" value="" type="hidden">
        <input id="ClientDate" name="ClientDate" value="" type="hidden">
    </div>
    
            </div>
        </footer>
    
        <footer class="bottom">
            <span class="localeContainer">
                    <form class="selectLocale" id="selectLocaleForm" action="http://msdn.microsoft.com/en-us/selectlocale-dmc">
        <input name="fromPage" value="http%3a%2f%2fmsdn.microsoft.com%2fen-us%2flibrary%2fff926074.aspx" type="hidden">
        <a href="#" onclick="$('#selectLocaleForm').submit();return false;" title="Change your language">United States (English)</a>
    </form>    


            </span>
        
            <div data-fragmentname="BottomLinks" id="Fragment_BottomLinks" xmlns="http://www.w3.org/1999/xhtml">
  
  <div class="linkList">
    <ul class="links horizontal">
      <li>
        <a href="http://msdn.microsoft.com/newsletter.aspx" id="BottomLinks_2148_7" xmlns="http://www.w3.org/1999/xhtml">Newsletter</a>
      </li>
      <li>
        <a href="http://msdn.microsoft.com/dn529288" id="BottomLinks_2148_8" xmlns="http://www.w3.org/1999/xhtml">Privacy &amp; cookies</a>
      </li>
      <li>
        <a href="http://msdn.microsoft.com/cc300389" id="BottomLinks_2148_9" xmlns="http://www.w3.org/1999/xhtml">Terms of use</a>
      </li>
      <li>
        <a href="http://www.microsoft.com/en-us/legal/intellectualproperty/Trademarks/EN-US.aspx" id="BottomLinks_2148_10" xmlns="http://www.w3.org/1999/xhtml">Trademarks</a>
      </li>
    </ul>
  </div>
</div>    
            <span class="logoLegal">
                <span class="logo"></span>
                <span class="copyright">© 2014 Microsoft</span>
            </span>
        </footer>
    </div>
    


            <div class="footerPrintView">
                <div class="footerCopyrightPrintView">© 2014 Microsoft. All rights reserved.</div>
            </div>

            
            
    
    
    <input id="tocPaddingPerLevel" value="17" type="hidden">


        
            <input id="MtpsDevice" value="Default" type="hidden">


<!--[CDATA[ Third party scripts and code linked to or referenced from this website are licensed to you by the parties that own such code, not by Microsoft.  See ASP.NET Ajax CDN Terms of Use – http://www.asp.net/ajaxlibrary/CDN.ashx. ]]-->
        
            
            
            
            
            
        





<noscript><div><img alt="DCSIMG" id="Img1" width="1" height="1" src="http://m.webtrends.com/dcsmgru7m99k7mqmgrhudo0k8_8c6m/njs.gif?dcsuri=/nojavascript&amp;WT.js=No" /></div></noscript>









<noscript>
  <a href="http://www.omniture.com" title="Web Analytics">
    <img src="//msstonojsmsdn.112.2o7.net/b/ss/msstonojsmsdn/1/H.20.2--NS/0" height="1" width="1" border="0" alt="" />
  </a>
</noscript>




<div id="globalRequestVerification">
    <input name="__RequestVerificationToken" value="9j41JBtTyir2R_CAno4xy5_CnOZKqxGUg4kcbEWKkWKzW75TPivqiHAIiezeSjv1OS1kWzmt461h-kSJQmKo-DlmkGU1" type="hidden">
</div>


        </div>
        
        
        
    <script type="text/javascript" class="mtps-injected">
/*<![CDATA[*/
(function(window,document){"use strict";function preload(scripts){for(var result=[],script,e,i=0;i<scripts.length;i++)script=scripts[i],script.hasOwnProperty("url")&&(e=document.createElement("script"),e.src=script.url,script.throwaway=e),result.push(script);return result}function inject(scripts,index){var script,elem;if(index>=scripts.length){delete mtps.injectScripts;return}script=scripts[index];elem=document.createElement("script");elem.className="mtps-injected";elem.async=!1;var isLoaded=!1,timeoutId=0,injectNextFnName="",injectNext=elem.onerror=function(){isLoaded||(isLoaded=!0,inject(scripts,index+1),window.clearTimeout(timeoutId),elem.onload=elem.onerror=elem.onreadystatechange=null,injectNextFnName&&delete mtps[injectNextFnName],elem.removeEventListener&&elem.removeEventListener("load",injectNext,!1))};elem.addEventListener?elem.addEventListener("load",injectNext,!1):elem.readyState==="uninitialized"?elem.onreadystatechange=function(){(this.readyState==="loaded"||this.readyState==="complete")&&injectNext()}:elem.onload=injectNext;script.hasOwnProperty("url")?(timeoutId=window.setTimeout(injectNext,12e4),elem.src=script.url):(injectNextFnName="_injectNextScript_"+index,mtps[injectNextFnName]=injectNext,timeoutId=window.setTimeout(injectNext,2e3),elem.text="try {\n"+script.txt+"\n} finally { MTPS."+injectNextFnName+" && MTPS."+injectNextFnName+"(); }");parent.appendChild(elem)}var mtps=window.MTPS||(window.MTPS={}),parent=document.getElementsByTagName("head")[0];mtps.injectScripts=function(scripts){inject(preload(scripts),0)}})(window,document);
MTPS.injectScripts([
	{ txt: "/**/\r\n(window.MTPS || (window.MTPS = {})).cdnDomains || (window.MTPS.cdnDomains = { \r\n\t\"image\": \"http://i.msdn.microsoft.com\", \r\n\t\"js\": \"http://i2.msdn.microsoft.com\", \r\n\t\"css\": \"http://i3.msdn.microsoft.com\"\r\n});\r\n/**/" },
	{ url: "http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.8.2.min.js" },
	{ txt: "//\n  var literalNormalizedUrl = \u0027/en-us/library/ff926074(d=default,l=en-us,v=vs.120).aspx\u0027;\n  var wt_nvr_ru = \u0027WT_NVR_RU\u0027;\n  var wt_fpcdom = \u0027.microsoft.com\u0027;\n  var wt_domlist = \u0027msdn.microsoft.com\u0027;\n  var wt_pathlist = \u0027\u0027;\n  var wt_paramlist = \u0027DCSext.mtps_devcenter\u0027;\n  var wt_siteid = \u0027MSDN\u0027;\n  var gDomain = \u0027m.webtrends.com\u0027;\n  var gDcsId = \u0027dcsmgru7m99k7mqmgrhudo0k8_8c6m\u0027;\n  var gFpc = \u0027WT_FPC\u0027;\n\n\n\n  if (document.cookie.indexOf(gFpc + \"=\") == -1) {\n    var wtidJs = document.createElement(\"script\");\n    wtidJs.src = \"//\" + gDomain + \"/\" + gDcsId + \"/wtid.js\";\n    document.getElementsByTagName(\"head\")[0].appendChild(wtidJs);\n  }\n\n\n\n  var detectedLocale = \u0027en-us\u0027;\n  var wtsp = \u0027msdnlib_devtools_lang\u0027;\n  var gTrackEvents = \u00270\u0027;\n/**/" },
	{ txt: "/**/\n  var omni_guid = \"67f91a6f-e93d-4c42-921c-46a418f57af8\";\n/**/" },
	{ txt: "//\n\n            window.appInsightsId = \u002760854590-027a-4ae4-98be-2741a40f355f\u0027;\n            //" },
	{ url: "http://i2.msdn.microsoft.com/Combined.js?resources=0:Utilities,1:Layout,2:Header,2:Footer,3:Feedback,0:Topic,4:webtrendsscript,5:omni_rsid_MSDN,0:AppInsightsPerf,6:SearchBox;/Areas/Epx/Content/Scripts:0,/Areas/Centers/Themes/Base/Content:1,/Areas/Centers/Themes/StandardDevCenter/Content:2,/Areas/Epx/Shared/Content:3,/Areas/Global/Content/Webtrends/resources:4,/Areas/Global/Content/Omniture/resources/MSDN:5,/Areas/Epx/Themes/Base/Content:6\u0026amp;hashKey=EED176C19311527742EAE9817FAEB030" },
	{ url: "http://i3.services.social.microsoft.com/search/Widgets/SearchBox.jss?boxid=HeaderSearchTextBox\u0026btnid=HeaderSearchButton\u0026brand=Msdn\u0026loc=en-us\u0026focusOnInit=false\u0026emptyWatermark=true\u0026searchButtonTooltip=Search MSDN" },
	{ url: "http://i2.msdn.microsoft.com/Combined.js?resources=0:PrintExportButton,1:Toc,1:NavigationResize,2:FeedbackCounter;/Areas/Library/Themes/Base/Content:0,/Areas/Library/Content:1,/Areas/Epx/Shared/Content:2\u0026amp;hashKey=66872A62A3ED5011793DE8DC80B4968C" },
	{ txt: "MTPS = window.MTPS || {}; MTPS.LocalizedStrings = window.MTPS.LocalizedStrings || {}; MTPS.LocalizedStrings.ExpandButtonTooltip = \u0027Expand\u0027; MTPS.LocalizedStrings.CollapseButtonTooltip = \u0027Collapse\u0027; MTPS.LocalizedStrings.EnhancedExpandTooltip = \u0027Click to expand. Double-click to expand all.\u0027; MTPS.LocalizedStrings.EnhancedCollapseTooltip = \u0027Click to collapse. Double-click to collapse all.\u0027; MTPS.LocalizedStrings.ExpandAllButtonTooltip = \u0027Expand All\u0027; MTPS.LocalizedStrings.CollapseAllButtonTooltip = \u0027Collapse All\u0027;" },
	{ txt: "MTPS = window.MTPS || {}; MTPS.LocalizedStrings = window.MTPS.LocalizedStrings || {}; MTPS.LocalizedStrings.ExpandButtonTooltip = \u0027Expand\u0027; MTPS.LocalizedStrings.CollapseButtonTooltip = \u0027Collapse\u0027; MTPS.LocalizedStrings.EnhancedExpandTooltip = \u0027Click to expand. Double-click to expand all.\u0027; MTPS.LocalizedStrings.EnhancedCollapseTooltip = \u0027Click to collapse. Double-click to collapse all.\u0027; MTPS.LocalizedStrings.ExpandAllButtonTooltip = \u0027Expand All\u0027; MTPS.LocalizedStrings.CollapseAllButtonTooltip = \u0027Collapse All\u0027;" },
	{ url: "http://i2.msdn.microsoft.com/Combined.js?resources=0:LibraryMemberFilter,1:Toc_Fixed,1:CodeSnippet,1:TopicNotInScope,1:CollapsibleArea,1:VersionSelector,1:SurveyBroker;/Areas/Library/Content:0,/Areas/Epx/Content/Scripts:1\u0026amp;hashKey=1C8383D9C3E7B9839E97A01E137738BF" },
	{ txt: "$(document).ready(function() {\n        try {\n            var token = $(\"#globalRequestVerification input[name=\u0027__RequestVerificationToken\u0027]\").clone();\n            $(\"#siteFeedbackForm\").append(token);\n        } catch(err) {\n            \n        }\n    });" }
]);

/*]]>*/
</script>
<script src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/broker-config.js"></script><div id="_WEDCSInsertedData" style="display: none;"><iframe id="_msnFrame" src="C%23%20Coding%20Conventions%20%28C%23%20Programming%20Guide%29_files/c_002.gif" style="z-index:-1;height:1px;width:1px;display:none;visibility:hidden;" onload="javascript:MscomBeacon();"></iframe></div></body></html>